library(ggplot2)
library(reshape2)

output <- function(filename, width)
	pdf(paste(filename, '.pdf', sep=''),
		paper='special', width=8, height=8/width)



X <- read.csv("cruz1.csv")
X <- X[c("y.1","y")]
names(X) <- c('V','T')

X <- melt(data.frame(X, t=1:nrow(X)), id.vars='t')

output('cruz1', 2)
p <- ggplot(X, aes(x=t, y=value)) + geom_line(aes(color=variable)) + xlab('time') + ylab('count') + theme(legend.title=element_blank())
print(p)
dev.off()





X <- read.csv("cruz.csv")
X <- X[c("y.1","y","y.2")]
names(X) <- c('V','T','ab')

X <- melt(data.frame(X, t=1:nrow(X)), id.vars='t')

output('cruz', 2)
p <- ggplot(X, aes(x=t, y=value)) + geom_line(aes(color=variable)) + xlab('time') + ylab('count') + theme(legend.title=element_blank())
print(p)
dev.off()

